package com.activiti01;

import org.activiti.engine.*;
import org.junit.Test;

/**
 *生成 activiti的数据库表
 * @author ldy
 */
public class TestCreate {
    /**
     * 使用 activiti 提供的默认方式来创建mysql表
     */
    @Test
    public void testCreateDbTable() {
        //使用classpath下的activiti.cfg.xml中的配置创建processEngine
        //须要使用activiti提供的工具类,使用方法getDefaultProcessEngine
        //getDefaultProcessEngine方法会默认从resource下读取名字为activiti.cfg.xml的文件
        //getDefaultProcessEngine()获取默认的流程引擎
        ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();

        HistoryService historyService = processEngine.getHistoryService();
        DynamicBpmnService dynamicBpmnService = processEngine.getDynamicBpmnService();
        ProcessEngineConfiguration processEngineConfiguration = processEngine.getProcessEngineConfiguration();
        ManagementService managementService = processEngine.getManagementService();
        RuntimeService runtimeService = processEngine.getRuntimeService();
        TaskService taskService = processEngine.getTaskService();
        String name = processEngine.getName();
        RepositoryService repositoryService = processEngine.getRepositoryService();
        processEngine.close();
        

        System.out.println(processEngine);
    }


}
